package com.smtech.xz.subscribe;

import com.smtech.xz.moden.RequestImageBean;
import com.smtech.xz.netutils.HttpMethods;

import io.reactivex.Observable;
import io.reactivex.observers.DisposableObserver;
import okhttp3.ResponseBody;

/**
 * @author Administrator
 */

public class OaSubscribe {
    /**
     * 获取数据
     */
    public static void getData(String postion, String type, DisposableObserver<ResponseBody> subscriber) {
        RequestImageBean bean = new RequestImageBean();
        bean.setPosition(postion);
        bean.setType(type);
        Observable<ResponseBody> observable = HttpMethods.getInstance().getHttpApi().getImages(bean);
        HttpMethods.getInstance().toSubscribe(observable, subscriber);
    }
}
